package vno.fux.res.pool
{
	import flash.utils.Dictionary;
	
	import vno.fux.res.manager.LoadState;
	import vno.fux.res.manager.ResourceManager;
	public class WalkTargetResource extends UiResource
	{		
		use namespace RM_URM;
		RM_URM var _arrow:AutoBitmap;
		RM_URM var _cross:AutoBitmap;
		public function WalkTargetResource(id_:uint)
		{
			super(id_);
		}
		
		public function get arrow():AutoBitmap
		{
			if(_loadStateDic[_arrow] == LoadState.NOT_LOAD)
			{
				_loadStateDic[_arrow] = LoadState.PRE_LOAD;
				ResourceManager.getInstance().ui.load(id);
			}
			return _arrow;
		}
		public function get cross():AutoBitmap
		{
			if(_loadStateDic[_cross] == LoadState.NOT_LOAD)
			{
				_loadStateDic[_cross] = LoadState.PRE_LOAD;
				ResourceManager.getInstance().ui.load(id);
			}
			return _cross;
		}
		override public function create():void
		{
			this._loadStateDic = new Dictionary(true);
			_arrow = new AutoBitmap;
			_cross = new AutoBitmap;
			this._loadStateDic[_arrow] = LoadState.NOT_LOAD;
			this._loadStateDic[_cross] = LoadState.NOT_LOAD;
		}
		
		override public function destroy():void
		{
			_arrow.detachAll();
			_arrow.dispose();
			_arrow = null;
			_cross.detachAll();
			_cross.dispose();
			_cross = null;
			this._loadStateDic = null;
		}
	}
}